<template>
	<view>
	<navigator url="" class="goods-item" :url="'../../pages/goods/show?id=' +goods.id">
		<!-- #ifdef MP-WEIXIN -->
		<image class="imageApp" :src="goods.cover_url"></image>
		<!-- #endif -->
		<!-- #ifdef H5 -->
		<u-image class="u-skeleton-fillet" width="100%" height="300rpx" :src="goods.cover_url"></u-image>
		<!-- #endif -->
		
		<view class="titel u-line-1 u-skeleton-rect">{{goods.title?goods.title:'暂无商品名称'}}</view>
		<view class="u-flex u-row-between">
			<view class="price u-skeleton-rect">￥{{goods.price}}</view>
			<view class="sales u-skeleton-rect">销量{{goods.sales}}</view>
		</view>
	</navigator>
	</view>
</template>

<script lang="ts">
	export default {
		name:"goods-card",
		props:{
			goods:{
				type:Object,
				default(){
					return{}
				}
			}
		},
		data() {
			return {
				
			};
		}
	}
</script>

<style lang="scss" scoped>
.goods-item{
		padding: 40rpx;
		margin-top: 10rpx;
		box-shadow: 0 12rpx 20rpx 0 raba(0,0,0,.1);
		border: #e3e3e3 1px solid;
		/* #ifndef H5 */
		.imageApp{
			width:280rpx;
			height:260rpx;
		}
		/* #endif */
		
		.titel{
			margin: 10rpx 0;
			font-weight: 500;
			font-size: 32rpx;
			width: 100%;
		}
		.price{
			color: red;
			width: 40%;
		}
		.sales{
			color: #888;
			width: 40%;
		}
	}
</style>
